package com.zhongxi.guoyuan.entity.coinStore;

import org.json.JSONObject;

/**
 * Created by Administrator on 2017/6/27.
 */

public class PostShopCartInfo {
    private String id;
    private String attrcollection;
    private String attrmd5;
    private String ctime;
    private String goodsid;
    private String goodsnum;
    private String shopid;
    private String useattr;
    private String userid;
    private boolean checked;
    private String getermethod;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAttrcollection() {
        return attrcollection;
    }

    public void setAttrcollection(String attrcollection) {
        this.attrcollection = attrcollection;
    }

    public String getAttrmd5() {
        return attrmd5;
    }

    public void setAttrmd5(String attrmd5) {
        this.attrmd5 = attrmd5;
    }

    public String getCtime() {
        return ctime;
    }

    public void setCtime(String ctime) {
        this.ctime = ctime;
    }

    public String getGoodsid() {
        return goodsid;
    }

    public void setGoodsid(String goodsid) {
        this.goodsid = goodsid;
    }

    public String getGoodsnum() {
        return goodsnum;
    }

    public void setGoodsnum(String goodsnum) {
        this.goodsnum = goodsnum;
    }

    public String getShopid() {
        return shopid;
    }

    public void setShopid(String shopid) {
        this.shopid = shopid;
    }

    public String getUseattr() {
        return useattr;
    }

    public void setUseattr(String useattr) {
        this.useattr = useattr;
    }

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public boolean isChecked() {
        return checked;
    }

    public void setChecked(boolean checked) {
        this.checked = checked;
    }

    public String getGetermethod() {
        return getermethod;
    }

    public void setGetermethod(String getermethod) {
        this.getermethod = getermethod;
    }

    public static PostShopCartInfo parseMatch(JSONObject jsonObject) {
        PostShopCartInfo shopCartInfo = null;
        try {
            shopCartInfo = new PostShopCartInfo();
            shopCartInfo.setId(jsonObject.optString("id"));
            shopCartInfo.setAttrcollection(jsonObject.optString("attrcollection"));
            shopCartInfo.setAttrmd5(jsonObject.optString("attrmd5"));
            shopCartInfo.setCtime(jsonObject.optString("ctime"));
            shopCartInfo.setGoodsid(jsonObject.optString("goodsid"));
            shopCartInfo.setGoodsnum(jsonObject.optString("goodsnum"));
            shopCartInfo.setShopid(jsonObject.optString("shopid"));
            shopCartInfo.setUseattr(jsonObject.optString("useattr"));
            shopCartInfo.setUserid(jsonObject.optString("userid"));
            shopCartInfo.setGetermethod(jsonObject.optString("getermethod"));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return shopCartInfo;
    }
}
